#pragma once
#include "macro.h"

namespace utils {
template <class T, int N>
struct Array {
  static constexpr int Size = N;
  static constexpr int ByteSize = N * sizeof(T);
  T data[N];
  HOST_DEVICE_INLINE T &operator[](int i) { return data[i]; }
  HOST_DEVICE_INLINE const T &operator[](int i) const { return data[i]; }
  HOST_DEVICE_INLINE void fill(const T val) {
    for (auto &d : data) d = val;
  }
};

template <typename T, int N, int Alignment = sizeof(T) * N>
struct ALIGN_AS(Alignment) AlignedArray : Array<T, N> {};
}  // namespace utils